home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Very Best of Atari Inside
/
The Very Best of Atari Inside 1.iso
/
mint
/
mntlb20
/
lib
/
fcntl.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-09-08
|
406b
|
29 lines
/*
* fcntl() emulation for MiNT; written by Eric R. Smith and placed
* in the public domain
*/
#include <errno.h>
#include <mintbind.h>
#include <fcntl.h>
extern int __mint; /* MiNT version */
int fcntl(f, cmd, arg)
int f, cmd;
void *arg;
{
long r;
if (__mint) {
r = Fcntl(f, arg, cmd);
}
else
r = -EINVAL;
if (r < 0) {
errno = -r;
r = -1;
}
return r;
}